{% extends "base_por1admin.html" %}

{% load jrc_shared %}

{% block mainheading %}{{ block.super }} \ Archive performance{% endblock %}

{% block content %}

    <table border="1">
        <thead>
            <th>Year</th>
            <th>Month</th>
            <th>Performance<br />(levered, %)</th>
            <th>risk free interest (%)</th>
            <th>risk free interest per month (%)</th>
            <th>Additional performance (%)</th>
            <th nowrap>VAR (additional performance)</th>
            <th nowrap>VAR (Performance)</th>
            <th nowrap>Downside Vola. Calculation</th>
        </thead>
        <tbody>

            {% for r in dvratios_iterator %}
            
                <tr class="{% cycle "row1" "row2" "row2" "row2" "row2" "row2" "row2" "row2" "row2" "row2" "row2" "row2" %}">
                    {% if r.month == 1 %}
                        <td><strong>{{ r.year }}</strong></td>
                    {% else %}
                        <td>&nbsp;</td>
                    {% endif %}
                    <td>{{ r.month }}</td>
                    <td>{{ r.get_related_performance.value }}</td>
                    <td>{{ r.value|jrc_intformat }}</td>
                    <td>{{ r.get_risk_free_interest_per_month|jrc_intformat }}</td>
                    <td>{{ r.get_additional_performance|jrc_intformat }}</td>
                    <td>{{ dvratios_iterator.get_current_var_additional_performance }}</td>
                    <td>&nbsp;</td>
                    <td>{{ r.get_downside_vola_calculation|jrc_intformat }}</td>
                </tr>
            
            {% empty %}
            
                <tr>
                    <td colspan="9">No DV So Sh Ratios?!</td>
                </tr>
            
            {% endfor %}

        <tr>
            <td><strong>Averages</strong></td>
            <td>&nbsp;</td>
            <td><strong>&nbsp;</strong></td>
            <td>&nbsp;</td>
            <td><strong>{{ dvratios_iterator.get_average_risk_free_interest_per_month }}</strong></td>
            <td><strong>{{ dvratios_iterator.get_average_additional_performance }}</strong></td>
            <td><strong></strong></td>
            <td><strong>&nbsp;</strong></td>
            <td><strong>&nbsp;</strong></td>
        </tr>

        </tbody>
    </table>
    
{% endblock %}
